//
//  DBHelper.h
//  ox
//
//  Created by 喻杰 on 2016/11/19.
//  Copyright © 2016年 fengge. All rights reserved.
//


#import <Foundation/Foundation.h>
#import <FMDB/FMDatabase.h>
#import "OxLog.h"

@interface DBHelper : NSObject 

@property (strong,nonatomic) NSString* dbPath;

@property (strong,nonatomic) FMDatabase * db;

@end

@interface DBHelper (dbOpt)

-(instancetype) init;

-(void)initDB;

-(BOOL)openDB;

-(BOOL)closeDB;

@end


@interface DBHelper (dataOpt)


-(BOOL)excuteBy:(NSString *)sql values:(NSArray *)arr;

-(NSMutableDictionary*) selectOneBy:(NSString*) sql params:(NSArray*)params;

-(NSMutableArray<NSMutableDictionary*>*)listBy:(NSString*) sql params:(NSArray*)params;

@end
